<template>
  <div>
    <h2>未完成</h2>
    <list :list="list"></list>
  </div>
</template>

<script>
import { defineComponent, computed } from 'vue'
import { useStore } from 'vuex'
// route不要随便用,会报错
// import { useRoute } from 'vue-router'
import List from '@/components/list'
export default defineComponent({
  name: 'completed',
  components: {
    List
  },
  setup () {
    const store = useStore()
    const list = computed(() => store.getters.undoneList)
    return {
      list
    }
  }
})
</script>

<style scoped>

</style>
